import request from '@/utils/request';
import { stringify } from 'qs';
export async function wechatConfigList(params) {
  return request(`/api/admin/wechat/weconf?${stringify(params)}`, {
    method: 'get',
  });
}

export async function wecharConfigUpdate(params) {
  return request(`/api/admin/wechat/upweconf`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function wechatDeleteConfig(params) {
  return request(`/api/admin/wechat/delconfig`, {
    method: 'POST',
    body: {
      id: params.key,
    },
  });
}

export async function wechatconfigadd(params) {
  return request(`/api/admin/wechat/add`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function wechatUserList(params) {
  return request(`/api/admin/wechat/weuser?${stringify(params)}`, {
    method: 'get',
  });
}
